def access_index(list1):
    for i in range(len(list1)):
        print(i, list1[i])

list1 = [1, 2, 3, 4, 5]
access_index(list1)